<template>
	<div class="report-page">
		<h2>导出中心</h2>
		<el-table :data="files" style="width: 100%">
			<el-table-column prop="name" label="报表名称" />
			<el-table-column prop="date" label="生成时间" />
			<el-table-column label="操作">
				<template #default="scope">
					<el-button size="small" @click="download(scope.row)">下载</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script setup>
import { ref } from 'vue'
import { ElMessage } from 'element-plus'

const files = ref([
	{ name: '日报表_2024-04-01', date: '2024-04-01' },
	{ name: '月报表_2024-03', date: '2024-04-01' }
])

function download(row) {
	ElMessage.success('已下载：' + row.name)
}
</script>